Due 9/7 by the start of class.

R practice: Birthdays

This week, you’ll use birth dates data collected by FiveThirtyEight. Have a look at the linked GitHub page so you understand what variables are included.

Download the ps2.R script and name it: lastname_ps2.R. Complete the tasks as described in the script and save. You’ll submit the completed script to me on slack (via direct message). I should be able to run the script as is (line by line) with no errors.

Your Data

Last week you identified a data set to work with for the final project and began to examine it. Add a new script to your project folder in which you

  1. Select two key variables you expect to be useful in the final visualization (you identified some key variables last week, but feel free to revise or update). Do either of these variables require additional cleaning/preparation (e.g., reformatting, filtering, recoding, re-leveling factors, mutating, etc.)? If so, add code to begin that cleaning. Either way, there should be some commands that I can follow to see how you checked that these two variables were structured in a reasonable way.
  2. Visualize the (univariate) distribution of these two variables in at least two different ways. Practice adding titles (and subtitles or captions), axis labels, legend titles, etc.

Share this new script with me on slack. It should be written so that I can add it to the project folder you shared with me last week and run it.

Bad Data Visualizations

Thinking about Cairo’s criteria for good data visualization (truthful, functional, beautiful, insightful, enlightening) and/or the converse of Schwabish’s guidelines (showing data, reducing clutter, avoiding spaghetti, integrating text), find a data visualization you think is especially “bad” and post it to the slack channel “goodviz-badviz” with a brief explanation of how you think it serves as an example of a poor data visualization (this is a chance to learn from one another). The Visualization Inspiration or Anti-Inspiration links on the resource page might help.


xkcd inspiration